import Layout from '@/layout'

const adminRoutes = [
  {
    path: '/admin',
    component: Layout,
    redirect: '/admin/login'
  },
  {
    path: '/admin/login',
    component: () => import('@/views/admin/login')
  },
  {
    path: '/admin/dashboard',
    component: Layout,
    hidden: true,
    children: [{
      path: '',
      component: () => import('@/views/admin/dashboard'),
      meta: { title: '临时', icon: 'dashboard' }
    }]
  },
  {
    path: '/admin/user',
    component: Layout,
    children: [{
      path: '',
      component: () => import('@/views/admin/user'),
      meta: { title: '用户管理', icon: 'dashboard' }
    }]
  },
  {
    path: '/admin/vote',
    component: Layout,
    children: [{
      path: '',
      component: () => import('@/views/admin/vote'),
      meta: { title: '投票管理', icon: '订单' }
    }]
  },
  {
    path: '/admin/type',
    component: Layout,
    children: [{
      path: '',
      component: () => import('@/views/admin/type'),
      meta: { title: '类别管理', icon: '类别' }
    }]
  },
  {
    path: '/admin/share',
    component: Layout,
    children: [{
      path: '',
      component: () => import('@/views/admin/share'),
      meta: { title: '动态管理', icon: '分享' }
    }]
  },
  {
    path: '/admin/notice',
    component: Layout,
    meta: { title: '公告管理', icon: '公告' },
    children: [
      {
        path: '',
        component: () => import('@/views/admin/notice/list'),
        meta: { title: '公告列表' }
      },
      {
        path: 'add',
        component: () => import('@/views/admin/notice/add'),
        meta: { title: '添加公告' }
      },
      {
        path: 'edit/:id',
        component: () => import('@/views/admin/notice/edit'),
        meta: { title: '编辑管理' },
        hidden: true
      }
    ]
  }
  // {
  //   path: '/admin/apply',
  //   component: Layout,
  //   children: [{
  //     path: '',
  //     component: () => import('@/views/admin/apply'),
  //     meta: { title: '申请处理', icon: '申请' }
  //   }]
  // }
]

export default adminRoutes
